package com.example.imtoken.modules.user.create.backups

import android.view.View
import com.blankj.utilcode.util.ActivityUtils
import com.blankj.utilcode.util.ClickUtils
import com.example.imtoken.R
import com.example.imtoken.core.App
import com.example.imtoken.core.base.BaseActivity
import com.example.imtoken.databinding.ActivityBackupsBinding
import com.example.imtoken.modules.main.MainActivity
import com.example.imtoken.modules.user.create.backups.mnemonic.MnemonicWordsActivity

/**
 * 备份提示
 */
class BackupsActivity :
    BaseActivity<BackupsViewModel, ActivityBackupsBinding>(BackupsViewModel::class.java) {

    override fun initLayoutId(): Int {
        return R.layout.activity_backups
    }

    override fun init() {

        App.newCreateData?.let {
            dataBinding.tvLater.visibility = View.GONE
        }

        ClickUtils.applyGlobalDebouncing(dataBinding.tvBackups) {
            ActivityUtils.startActivity(MnemonicWordsActivity::class.java)
        }

        ClickUtils.applyGlobalDebouncing(dataBinding.tvLater) {
            viewModel.addBackUp()
            ActivityUtils.startActivity(MainActivity::class.java)
        }
    }


}